<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/module/bootstrap-3.4.1/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/module/bootstrap-3.4.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="/font/font-awesome-4.7.0/css/font-awesome.css">
    <style>
        #warp {
            display: flex;
        }
        #warp .left {
            width: 200px;
            height: 100vh;
        }
        #warp .left .sidebar {
            height: 100%;
        }
        .left .sidebar #mycollapse {
            height: 100%;
        }
        .left .nav li i {
            padding-right: 40px;
        }
        #warp .right{
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        #warp .right .breadcrumb {
            margin-bottom: 0;
        }
        #warp .right .content {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        #warp .right .content p {
            font-weight: bold;
            font-size: 30px;
        }
    </style>
    <title>首页</title>
</head>
<body>
    <div id="warp">
        <div class="left">
            <div class="sidebar">
                <div class="navbar navbar-default" id="mycollapse">
                    <!-- <ul class="nav navbar-nav nav-pills nav-stacked"> -->
                    <ul class="nav nav-pills nav-stacked">
                        <li class="active"><a href="/index"><i class="fa fa-dashboard fa-fw"></i>首页</a></li>
                        <li><a href="/user"><i class="fa fa-address-card fa-fw"></i>用户</a></li>
                        <li><a href="/subscribe"><i class="fa fa-calendar-times-o fa-fw"></i>预约</a></li>
                        <li><a href="/activity "><i class="fa fa-ship fa-fw"></i>活动</a></li>
                        <li><a href="/integral "><i class="fa fa-line-chart fa-fw"></i>积分</a></li>
                        <li><a href="/opinion"><i class="fa fa-pencil-square fa-fw"></i>意见</a></li>
                        <li><a href="/goods"><i class="fa fa-shopping-cart fa-fw"></i>商品</a></li>
                        <li><a href="/graph"><i class="fa fa-picture-o fa-fw"></i>轮播图</a></li>
                        <li><a href="/scan"><i class="fa fa-header fa-fw"></i>扫描记录</a></li>
                        <li><a href="/classify"><i class="fa fa-shekel fa-fw"></i>分类</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="right">
            <ol class="breadcrumb">
                <li class="active">首页</li>
            </ol>
            <button @click="clearClick" style="width: 60px;margin: 30px;">初始化</button>
            <div class="content">
                <p>欢迎来到肇卫士后台</p>
            </div>
        </div>
    </div>

    <script src="/js/jquery.min.js"></script>
    <script src="/module/bootstrap-3.4.1/js/bootstrap.min.js"></script>
    <script src="/js/vue.js"></script>
    <script src="/js/axios.min.js"></script>
    <script>
        const app = new Vue({
            el: '#warp',
            methods: {
                clearClick() {
                    axios.get('/request/clearAll').then(res => {
                        if (res.status === 200 && res.data.code === 200) {
                            alert('初始化成功')
                        }else {
                            alert('初始化失败')
                        }
                    })
                }
            }
        })
    </script>
</body>
</html>